<?php
/**
 * Copyright (c) 2006, PORTALIER Julien
 *
 * Licensed under The LGPL License
 * Redistributions of files must retain the above copyright notice.
 *
 * @package      FeatherCMS
 * @subpackage   Labels
 * @copyright    Copyright (c) 2006, Julien PORTALIER
 * @link         http://julien.portalier.com
 * @license      http://www.opensource.org/licenses/lgpl-license.php The LGPL License
 */

require_once FEATHER.'controllers'.DS.'tags.php';

abstract class LabelsController extends TagsController
{
	public $_templates = 'labels';
	
	function manage()
	{
		$this->__check();
		$this->__manage();
	}
	
	function rename($tag)
	{
		$this->__check();
		$this->__rename(null, $tag);
	}
	
	function erase($tag)
	{
		$this->__check();
		$this->__erase(null, $tag);
	}
	
	function __check()
	{
		$grp = null;
		eval("\$grp = Config::who_can_{$this->module};");
		
		if (!$this->acl->inGroup($grp))
			$this->acl->permissionDenied();
	}
}
?>